import { Module } from '@nestjs/common';
import { MongooseModule } from '@nestjs/mongoose';
import { AppController } from './app.controller';
import { AppService } from './app.service';
// 全局共享模块
import { GlobalRsaKeyPairModule } from './modules/global-module/rsa-key-pair/module';
// 业务模块
import { UserModule } from './modules/user/user.module';
import { CommonModule } from './modules/common/common.module';
import { DogModule } from './modules/dog/dog.module';

@Module({
  imports: [
    // 三方模块
    MongooseModule.forRoot(
      'mongodb://yapipro:yapipro1024@121.40.222.15:27017/mqtt-sharelink?authSource=admin'
    ),
    // 全局共享模块
    GlobalRsaKeyPairModule,
    // 业务模块
    UserModule,
    CommonModule,
    DogModule,
  ],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}
